Integrand size = 20, antiderivative size = 101 \[ \int \frac {(d+e x)^2}{a+b x+c x^2} \, dx=\frac {e^2 x}{c}-\frac {\left (2 c^2 d^2+b^2 e^2-2 c e (b d+a e)\right ) \text {arctanh}\left (\frac {b+2 c x}{\sqrt {b^2-4 a c}}\right )}{c^2 \sqrt {b^2-4 a c}}+\frac {e (2 c d-b e) \log \left (a+b x+c x^2\right )}{2 c^2} \]
[Out]
Time = 0.08 (sec) , antiderivative size = 101, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {715, 648, 632, 212, 642} \[ \int \frac {(d+e x)^2}{a+b x+c x^2} \, dx=-\frac {\text {arctanh}\left (\frac {b+2 c x}{\sqrt {b^2-4 a c}}\right ) \left (-2 c e (a e+b d)+b^2 e^2+2 c^2 d^2\right )}{c^2 \sqrt {b^2-4 a c}}+\frac {e (2 c d-b e) \log \left (a+b x+c x^2\right )}{2 c^2}+\frac {e^2 x}{c} \]
[In]
[Out]
Rule 212
Rule 632
Rule 642
Rule 648
Rule 715
Rubi steps \begin{align*} \text {integral}& = \int \left (\frac {e^2}{c}+\frac {c d^2-a e^2+e (2 c d-b e) x}{c \left (a+b x+c x^2\right )}\right ) \, dx \\ & = \frac {e^2 x}{c}+\frac {\int \frac {c d^2-a e^2+e (2 c d-b e) x}{a+b x+c x^2} \, dx}{c} \\ & = \frac {e^2 x}{c}+\frac {(e (2 c d-b e)) \int \frac {b+2 c x}{a+b x+c x^2} \, dx}{2 c^2}+\frac {\left (-b e (2 c d-b e)+2 c \left (c d^2-a e^2\right )\right ) \int \frac {1}{a+b x+c x^2} \, dx}{2 c^2} \\ & = \frac {e^2 x}{c}+\frac {e (2 c d-b e) \log \left (a+b x+c x^2\right )}{2 c^2}-\frac {\left (-b e (2 c d-b e)+2 c \left (c d^2-a e^2\right )\right ) \text {Subst}\left (\int \frac {1}{b^2-4 a c-x^2} \, dx,x,b+2 c x\right )}{c^2} \\ & = \frac {e^2 x}{c}-\frac {\left (2 c^2 d^2+b^2 e^2-2 c e (b d+a e)\right ) \tanh ^{-1}\left (\frac {b+2 c x}{\sqrt {b^2-4 a c}}\right )}{c^2 \sqrt {b^2-4 a c}}+\frac {e (2 c d-b e) \log \left (a+b x+c x^2\right )}{2 c^2} \\ \end{align*}
Time = 0.04 (sec) , antiderivative size = 101, normalized size of antiderivative = 1.00 \[ \int \frac {(d+e x)^2}{a+b x+c x^2} \, dx=\frac {2 c e^2 x+\frac {2 \left (2 c^2 d^2+b^2 e^2-2 c e (b d+a e)\right ) \arctan \left (\frac {b+2 c x}{\sqrt {-b^2+4 a c}}\right )}{\sqrt {-b^2+4 a c}}+e (2 c d-b e) \log (a+x (b+c x))}{2 c^2} \]
[In]
[Out]
Time = 25.42 (sec) , antiderivative size = 107, normalized size of antiderivative = 1.06
method | result | size |
default | \(\frac {e^{2} x}{c}+\frac {\frac {\left (-e^{2} b +2 c d e \right ) \ln \left (c \,x^{2}+b x +a \right )}{2 c}+\frac {2 \left (-e^{2} a +c \,d^{2}-\frac {\left (-e^{2} b +2 c d e \right ) b}{2 c}\right ) \arctan \left (\frac {2 c x +b}{\sqrt {4 a c -b^{2}}}\right )}{\sqrt {4 a c -b^{2}}}}{c}\) | \(107\) |
risch | \(\text {Expression too large to display}\) | \(1969\) |
[In]
[Out]
none
Time = 0.40 (sec) , antiderivative size = 324, normalized size of antiderivative = 3.21 \[ \int \frac {(d+e x)^2}{a+b x+c x^2} \, dx=\left [\frac {2 \, {\left (b^{2} c - 4 \, a c^{2}\right )} e^{2} x - {\left (2 \, c^{2} d^{2} - 2 \, b c d e + {\left (b^{2} - 2 \, a c\right )} e^{2}\right )} \sqrt {b^{2} - 4 \, a c} \log \left (\frac {2 \, c^{2} x^{2} + 2 \, b c x + b^{2} - 2 \, a c + \sqrt {b^{2} - 4 \, a c} {\left (2 \, c x + b\right )}}{c x^{2} + b x + a}\right ) + {\left (2 \, {\left (b^{2} c - 4 \, a c^{2}\right )} d e - {\left (b^{3} - 4 \, a b c\right )} e^{2}\right )} \log \left (c x^{2} + b x + a\right )}{2 \, {\left (b^{2} c^{2} - 4 \, a c^{3}\right )}}, \frac {2 \, {\left (b^{2} c - 4 \, a c^{2}\right )} e^{2} x - 2 \, {\left (2 \, c^{2} d^{2} - 2 \, b c d e + {\left (b^{2} - 2 \, a c\right )} e^{2}\right )} \sqrt {-b^{2} + 4 \, a c} \arctan \left (-\frac {\sqrt {-b^{2} + 4 \, a c} {\left (2 \, c x + b\right )}}{b^{2} - 4 \, a c}\right ) + {\left (2 \, {\left (b^{2} c - 4 \, a c^{2}\right )} d e - {\left (b^{3} - 4 \, a b c\right )} e^{2}\right )} \log \left (c x^{2} + b x + a\right )}{2 \, {\left (b^{2} c^{2} - 4 \, a c^{3}\right )}}\right ] \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 588 vs. \(2 (95) = 190\).
Time = 1.11 (sec) , antiderivative size = 588, normalized size of antiderivative = 5.82 \[ \int \frac {(d+e x)^2}{a+b x+c x^2} \, dx=\left (- \frac {e \left (b e - 2 c d\right )}{2 c^{2}} - \frac {\sqrt {- 4 a c + b^{2}} \cdot \left (2 a c e^{2} - b^{2} e^{2} + 2 b c d e - 2 c^{2} d^{2}\right )}{2 c^{2} \cdot \left (4 a c - b^{2}\right )}\right ) \log {\left (x + \frac {- a b e^{2} - 4 a c^{2} \left (- \frac {e \left (b e - 2 c d\right )}{2 c^{2}} - \frac {\sqrt {- 4 a c + b^{2}} \cdot \left (2 a c e^{2} - b^{2} e^{2} + 2 b c d e - 2 c^{2} d^{2}\right )}{2 c^{2} \cdot \left (4 a c - b^{2}\right )}\right ) + 4 a c d e + b^{2} c \left (- \frac {e \left (b e - 2 c d\right )}{2 c^{2}} - \frac {\sqrt {- 4 a c + b^{2}} \cdot \left (2 a c e^{2} - b^{2} e^{2} + 2 b c d e - 2 c^{2} d^{2}\right )}{2 c^{2} \cdot \left (4 a c - b^{2}\right )}\right ) - b c d^{2}}{2 a c e^{2} - b^{2} e^{2} + 2 b c d e - 2 c^{2} d^{2}} \right )} + \left (- \frac {e \left (b e - 2 c d\right )}{2 c^{2}} + \frac {\sqrt {- 4 a c + b^{2}} \cdot \left (2 a c e^{2} - b^{2} e^{2} + 2 b c d e - 2 c^{2} d^{2}\right )}{2 c^{2} \cdot \left (4 a c - b^{2}\right )}\right ) \log {\left (x + \frac {- a b e^{2} - 4 a c^{2} \left (- \frac {e \left (b e - 2 c d\right )}{2 c^{2}} + \frac {\sqrt {- 4 a c + b^{2}} \cdot \left (2 a c e^{2} - b^{2} e^{2} + 2 b c d e - 2 c^{2} d^{2}\right )}{2 c^{2} \cdot \left (4 a c - b^{2}\right )}\right ) + 4 a c d e + b^{2} c \left (- \frac {e \left (b e - 2 c d\right )}{2 c^{2}} + \frac {\sqrt {- 4 a c + b^{2}} \cdot \left (2 a c e^{2} - b^{2} e^{2} + 2 b c d e - 2 c^{2} d^{2}\right )}{2 c^{2} \cdot \left (4 a c - b^{2}\right )}\right ) - b c d^{2}}{2 a c e^{2} - b^{2} e^{2} + 2 b c d e - 2 c^{2} d^{2}} \right )} + \frac {e^{2} x}{c} \]
[In]
[Out]
Exception generated. \[ \int \frac {(d+e x)^2}{a+b x+c x^2} \, dx=\text {Exception raised: ValueError} \]
[In]
[Out]
none
Time = 0.27 (sec) , antiderivative size = 102, normalized size of antiderivative = 1.01 \[ \int \frac {(d+e x)^2}{a+b x+c x^2} \, dx=\frac {e^{2} x}{c} + \frac {{\left (2 \, c d e - b e^{2}\right )} \log \left (c x^{2} + b x + a\right )}{2 \, c^{2}} + \frac {{\left (2 \, c^{2} d^{2} - 2 \, b c d e + b^{2} e^{2} - 2 \, a c e^{2}\right )} \arctan \left (\frac {2 \, c x + b}{\sqrt {-b^{2} + 4 \, a c}}\right )}{\sqrt {-b^{2} + 4 \, a c} c^{2}} \]
[In]
[Out]
Time = 9.87 (sec) , antiderivative size = 147, normalized size of antiderivative = 1.46 \[ \int \frac {(d+e x)^2}{a+b x+c x^2} \, dx=\frac {e^2\,x}{c}+\frac {\ln \left (c\,x^2+b\,x+a\right )\,\left (b^3\,e^2-2\,d\,b^2\,c\,e-4\,a\,b\,c\,e^2+8\,a\,d\,c^2\,e\right )}{2\,\left (4\,a\,c^3-b^2\,c^2\right )}+\frac {\mathrm {atan}\left (\frac {b}{\sqrt {4\,a\,c-b^2}}+\frac {2\,c\,x}{\sqrt {4\,a\,c-b^2}}\right )\,\left (b^2\,e^2-2\,b\,c\,d\,e+2\,c^2\,d^2-2\,a\,c\,e^2\right )}{c^2\,\sqrt {4\,a\,c-b^2}} \]
[In]
[Out]